<?php
if($this->do=='draft'){
	$this->template->in('header',$this->get_header());
	$this->template->in('footer',$this->get_footer());
	$this->template->out('content.draft.php');
}
if($this->do=='draft_insert'){
	check_request();
	if($this->config['content_draft_status']==0)http_404();
	$draft_title=empty($_POST['draft_title'])?'':trim(addslashes($_POST['draft_title']));
	$draft_content=empty($_POST['draft_content'])?'':trim(addslashes($_POST['draft_content']));
	$draft_author=empty($_POST['draft_author'])?'':trim(addslashes($_POST['draft_author']));
	if($draft_title==''){
		alert('标题不能为空');
	}
	if($draft_content==''){
		alert('内容不能为空');
	}
	if($draft_author==''){
		alert('作者不能为空');
	}
	$array=array();
	$array['draft_title']=$draft_title;
	$array['draft_content']=$draft_content;
	$array['draft_author']=$draft_author;
	$array['draft_time']=$_SERVER['REQUEST_TIME'];
	$this->db->insert(DB_PREFIX."content_draft",$array);
	alert('感谢您的投递！我们会在第一时间审核！','/');
}
?>